]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
init: Include the error stack in the context termination error message
authorMarco Trevisan (Treviño) <mail@3v1n0.net>
Thu, 17 Aug 2023 21:42:02 +0000 (23:42 +0200)
committerMarge Bot <marge-bot@gnome.org>
Fri, 18 Aug 2023 00:31:10 +0000 (00:31 +0000)
If a failure happened during initialization the shell does not provide
any debug information, and so only the error is shown without a stack
trace.

Since this information is provided, pass it as the error message.

Do not log this directly from JS so that we just use one termination
path.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2899>

js/ui/init.js

index 2dea981b7a9f19e2727ee77be2b8baff5fdf0a67..a7cf7db3e90470f7fb940f0bb1b1c9fc8ee7166f 100644 (file)
@@ -11,7 +11,7 @@ imports._promiseNative.setMainLoopHook(() => {
         import('./main.js').then(main => main.start()).catch(e => {
             const error = new GLib.Error(
                 Gio.IOErrorEnum, Gio.IOErrorEnum.FAILED,
-                e.message);
+                `${e.message}\n${e.stack}`);
             global.context.terminate_with_error(error);
         });
         return GLib.SOURCE_REMOVE;